#include "dukeNukem.h"

DukeNukem::DukeNukem(MD2Model *opponentModel, MD2Model *weaponModel) : Opponent(opponentModel, weaponModel)
{
	stayingAnimationSpeed = 0.01;
	attackingAnimationSpeed = 0.045;
	bloodingAnimationSpeed = 0.045;
	dyingAnimationSpeed = 0.025;

	strcpy_s(hitFrame, strlen(hitFrame), "pain1");

	pos1x = 1;
	pos1y = 0.89;
	pos1z = 1.5;

	isStaying = true;
	opponentModel->setAnimation("stand");
	weaponModel->setAnimation("stand");
}

void DukeNukem::draw()
{
	glPushMatrix();
		glTranslated(posx, posy, posz);
		
		glScalef(0.01, 0.01, 0.01);
		glRotated(180, 0, 1, 0);
		glRotated(-90, 1, 0, 0);
		
		if (opponentModel != NULL)
			opponentModel->draw();
		if (weaponModel != NULL)
			weaponModel->draw();
	glPopMatrix();
}